package net.teamclerks.rpgf.scene;

import net.teamclerks.rpgf.scene.map.Map;
import net.teamclerks.rpgf.script.Script;
import net.teamclerks.rpgf.script.director.Director;

/**
 * Scene is the object which houses the overall data of the view.
 * The idea here is that when a player "zones" into a new area 
 * (enters a town, shop, world, etc) and has the ability to explore
 * everything in that area, that area is the Scene. <br/>
 * <br/>
 * For instance, if a player moves his PlayerAvatar into a 1-room
 * shop, the entire shop is the Scene. If the player moves his PlayerAvatar
 * out of the shop into the town, the town is the Scene.
 * <br/><br/>
 * The Scene houses data such as the Map, any music or meta-data associated
 * with the scene, it can house textures to be rendered, etc.
 * @author msmith
 *
 */
public class Scene
{
  /// CONTROL DATA ///
  /**
   * The Map is the structure which houses the overall layout of
   * the Scene. If there are Avatars, they are on the Map, if there
   * are blocked areas, they are on the Map, etc.
   */
  protected Map map;
  /**
   * The system's Director reference.
   */
  protected Director director;
  /**
   * The Script of Actions for this Scene.
   */
  protected Script script;
  
  /// DENY CONSTRUCTOR ///
  private Scene(){}
  
  /// PUBLIC CONSTRUCTOR ///
  public Scene(Director director)
  {
    this();
    this.director = director;
    this.director.setScene(this);
  }
  
  /// PUBLIC METHODS ///
  /**
   * Gets the Script for this Scene.
   * @return
   */
  public final Script getScript()
  {
    return script;
  }
  /**
   * Sets the Script for this Scene.
   * @param script
   */
  public final void setScript(Script script)
  {
    this.script = script;
  }
}
